package net.service.impl;

import net.mapper.ProductMapper;
import net.pojo.Product;
import net.pojo.ProductExample;
import net.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ProductServiceImpl implements ProductService {
    @Autowired
    ProductMapper productMapper;



    @Override
    public List<Product> findAllProduct() {
        ProductExample productExample = new ProductExample();
        return productMapper.selectByExample(productExample);
    }

    @Override
    public List<Product> findByClick() {
        return productMapper.findByClick();
    }

    @Override
    public List<Product> findByComment() {
        return productMapper.findByComment();
    }
}
